'use strict';
 const db = uniCloud.database();
exports.main = async (event, context) => {
  //event为客户端上传的参数
  let search=event.name
  const collection = db.collection('users');
  let res=await collection.where({"user_name":search}).get();
  let users=res.data;
  console.log('event : ' + event)
  //返回数据给客户端
  return {"status":2, "users":users}
};
